﻿@inject IStringLocalizer<AutoCompleteGroup> Localizer

<div class="row g-3">
    <div class="col-12 col-sm-6 col-md-4">
        <BootstrapInputGroup>
            <BootstrapInputGroupLabel DisplayText="@Localizer["BlockGroupPrevLabel"]"/>
            <AutoComplete Items="@StaticItems" OnSelectedItemChanged="OnSelectedItemChanged"></AutoComplete>
        </BootstrapInputGroup>
    </div>
    <div class="col-12 col-sm-6 col-md-4">
        <BootstrapInputGroup>
            <AutoComplete Items="@StaticItems" OnSelectedItemChanged="OnSelectedItemChanged"></AutoComplete>
            <BootstrapInputGroupLabel DisplayText="@Localizer["BlockGroupPrevLabel"]"/>
        </BootstrapInputGroup>
    </div>
    <div class="col-12 col-sm-6 col-md-4">
        <BootstrapInputGroup>
            <BootstrapInputGroupLabel DisplayText="@Localizer["BlockGroupPrevLabel"]"/>
            <AutoComplete Items="@StaticItems" OnSelectedItemChanged="OnSelectedItemChanged"></AutoComplete>
            <BootstrapInputGroupLabel DisplayText="@Localizer["BlockGroupSuffixLabel"]"/>
        </BootstrapInputGroup>
    </div>
</div>
<BlockLogger @ref="Trace" class="mt-3"/>

@code {
    private static List<string> StaticItems => new() { "1", "12", "123", "1234", "12345", "123456", "abc", "abcdef", "ABC", "aBcDeFg", "ABCDEFG" };
    [NotNull]
    private BlockLogger? Trace { get; set; }
    private Task OnSelectedItemChanged(string val)
    {
        Trace.Log($"Value: {val}");
        return Task.CompletedTask;
    }

}
